﻿using System.Collections.Generic;
using System;
using XExcel.Validations;

namespace XExcel.Models
{
    public interface IXSheet
    {
        int SheeetIndex { get; }
        string SheeetName { get; }
        int GetColumnIndex(string colName);
        void Transfer();
        TranferState State { get; }
    }
    public interface IXSheet<T> : IXSheet where T : new()
    {
        void Add(IXRow<T> row);
        IList<IXRow<T>> Rows { get; }
        IXSheet<T> Map(string propName, string colName, Func<IXCell, object> convertor = null);
        IXSheet<T> Map(string propName, string colName, IValidate validate);
        IXSheet<T> Map(string propName, string colName, Func<IXCell, object> convertor, IValidate validate);
    }
}